#include "ShareMemory.hpp"

int main()
{
    //1、获取共享内存
    shm.GetShm();
    //2、挂接
    shm.AttachShm();

    gpipe.OpenPipeForWrite();

    struct data *image = (struct data *)shm.GetAddr();
    //char ch = 'A';
    while (true)
    {
        strcpy(image->status, "最新");
        strcpy(image->lasttime, GetCurTime().c_str());
        strcpy(image->image, "###############");
        gpipe.Signal();
        sleep(1);
        // strinfo[ch - 'A'] = ch;
        // ch++;
        // sleep(1);
    }

    //3、去关联
    shm.DetachShm();
    return 0;
}